import style from './home.module.css'
import { useSelector } from 'react-redux'
// import useAuth from '@/hooks/useAuth'
const Home = ()=>{
  // const isAuthed = useAuth()
  // console.log(isAuthed,'isAuthed')
  // 使用useSelector从状态管理库中获取存储的数据
  const {username} = useSelector(state=>state.userSlice)

  // if(!isAuthed){
  //   return null
  // }

  return (
    <div>
      <h2 className={style.title}>home</h2>
      <p>RTK中的用户:{username}</p>
    </div>
  )
}

export default Home